<#include "/includes/header.ftl">


<div id='productlist_brands'>
	<#include "/includes/leftbar.ftl">
</div>

<div id='productlist_contents'>
<#if product?has_content>
  	<form name="edit_store_profile" action='<@spring.url "/updateproductprimarycategory.php"/>' method="post" onsubmit="return check_form(create_account);">
  		<INPUT type='hidden' name='prdsid' value='${product.sysId}'>
  		<b>Update Product【<A href='<@spring.url "/viewproductdetail.jsp?prdsid=${product.sysId}"/>'>${product.name?default("")}</A>】 Primary Category</b>
  		&nbsp;<A href='<@spring.url "/editproductprofile.php?prdsid=${product.sysId}"/>'>Edit</A> 
		<div><hr/></div>
		<div class="label">
			<#if primaryCategoryTrail?has_content>
				<#list primaryCategoryTrail as g>
					<A href='<@spring.url "/updateproductprimarycategory.php?catid=${g.id}&prdsid=${product.sysId}"/>'>${g.name}</A>&gt;&gt;
				</#list>
				<div><hr/><hr/></div>
			</#if>
		</div>
		<div class="label">
			<#if childCategoryList?has_content>
				<#list childCategoryList as g>
					<A href='<@spring.url "/updateproductprimarycategory.php?catid=${g.id}&prdsid=${product.sysId}"/>'>${g.name}</A>
				</#list>
			</#if>
		</div>
		
		<div>
		<#if category?has_content && !childCategoryList?has_content>
			<div class="label">
				<#if category?has_content>
					<INPUT type='hidden' name='catid' value='${category.id}'/>${category.name?default("No-Name")}
				</#if>
			</div>
			<div class="label">
				<#if brandList?has_content>
					<#list brandList as brand>
					<INPUT type='radio' name='brdsid' value='${brand.sysId}' <#if  product.brand?has_content && brand.sysId == product.brand.sysId>checked</#if>/>${brand.name?default("No-Brand-Name")}
					</#list>
				</#if>
			</div>
	    	<input type="submit" name="Submit" value="保存" />
	    </#if>
		</div>
	</form>		

	<div><hr/><hr/><hr/></div>
	<div class="label">Preset Primary Category:</div>
	<div>
	<#if oldPrimaryCategoryTrail?has_content>
		<#list oldPrimaryCategoryTrail as g>
		<A href='<@spring.url "/updateproductprimarycategory.php?catid=${g.id}&prdsid=${product.sysId}"/>'>${g.name}</A>&gt;&gt;
		</#list>
	</#if>&nbsp;&nbsp;<A href='<@spring.url "/updateproductprimarycategory.php?prdsid=${product.sysId}"/>'>Edit</A>
	</div>
	
	<div><hr/><hr/><hr/></div>
	<div class="label">Preset Brand:</div>
	<div>
	<#if product.brand?has_content>
		${product.brand.name?default("No-Brand-Name")}
	</#if>
	</div>
	<div><hr/><hr/><hr/></div>
<#else>
	Not found product!
</#if>	
</div>

<#include "/includes/footer.ftl">